package com.cn.jinl.dao;

import com.cn.jinl.domain.ProductStorageOutRelate;
import com.cn.jinl.domain.ProductStorageOutRelateExample;
import java.util.List;
import java.util.Map;

import com.cn.jinl.utils.QueryForm;
import org.apache.ibatis.annotations.Param;

import javax.management.Query;

public interface ProductStorageOutRelateMapper {
    int countByExample(ProductStorageOutRelateExample example);

    int deleteByExample(ProductStorageOutRelateExample example);

    int insert(ProductStorageOutRelate record);

    int insertSelective(ProductStorageOutRelate record);

    int batchInsertOutRelates(@Param("itemList") List<ProductStorageOutRelate> records);

    List<ProductStorageOutRelate> selectByExample(ProductStorageOutRelateExample example);
    List<ProductStorageOutRelate> selectOutLeftProductStorages();

    int updateByExampleSelective(@Param("record") ProductStorageOutRelate record, @Param("example") ProductStorageOutRelateExample example);

    int updateByExample(@Param("record") ProductStorageOutRelate record, @Param("example") ProductStorageOutRelateExample example);

    List<ProductStorageOutRelate> selectGradeValue(QueryForm queryForm);

    List<ProductStorageOutRelate> selectProductStorageOutRelateGroupByCode();

    List<ProductStorageOutRelate> selectOutDataByGradeAndBoxCodes( @Param("itemId") String itemId, @Param("gradeValue") String gradeValue, @Param("boxCodes") List<String> boxCodes);

    int batchUpdateOutRelate(List<ProductStorageOutRelate> relates);

    List<String> selectExistingBoxCodes(@Param("boxCodes") List<String> boxCodes);

    void batchInsert(@Param("list") List<Map<String, Object>> records);

}